package com.example.jnivxbuffer;

import android.view.Surface;

public class AppDisplay {
    // Load the native library
    static {
        System.loadLibrary("native-egl-lib");
    }
    AppDisplay(Surface surface){
        m_surface = surface;
    }

    public int initResources(){
        return appEglOpenWindow(m_surface);
    };

    public void releaseResources() {
        appEglCloseWindow();
    }

    public void swapBuffer() {
        appEglSwap();
    }


    private final Surface m_surface;
    private native int appEglOpenWindow(Surface surface);
    private native void appEglCloseWindow();
    private native void appEglSwap();
}
